package com.world.cat.controller.api;

import com.world.common.pojo.ApiResult;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by gang on 2016/12/24.
 */
@Controller
@RequestMapping("/api")
public class ApiController {
    private static final Logger logger = Logger.getLogger(ApiController.class);

    @RequestMapping(value = "/hello", name = "你好")
    @ResponseBody
    public Object hello(String id, String token) throws Exception {
        logger.info(id);
        logger.info(token);
        String data = "你好";
        return new ApiResult(0, "成功", data);
    }
}
